#!/bin/sh
# 判断下文件大小
delFlieName="out.log"
filesize=`ls -l ${delFlieName} | awk '{print $5}'`
# 转为 M
filesize=$[filesize/1024/1024]
if [ $filesize -lt 5 ]
then
   echo "${delFlieName} is ${filesize}M, it is skip"
   exit 1
fi

#清空
cat /dev/null > $delFlieName